package validjson;

public class IntegerValidator extends NumberValidator {
    public IntegerValidator(Schema schema) {
        super(schema);
    }

    public void validate(Object jsonToValidate) throws ValidationException {
        if (!(jsonToValidate instanceof Integer)) {
            throw new ValidationException(String.format("Validator expected a value of type '%s' but got %s", "Integer", jsonToValidate == null ? null : jsonToValidate.getClass()));
        }
        super.validate(jsonToValidate);
    }
}
